<template>
  <el-form :inline="true" label-width="100px" :model="data">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="车行道ID:">
          <span>{{ data.roadwayID }}</span>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="道路名称:">
          <span>{{ data.roadName }}</span>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="日常检测号:">
          <span>{{ data.dailyInspecteID }}</span>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="生成时间:">
          <span>{{ toTimeString(data.dailyInspecteDate) }}</span>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="检测状态:">
          <el-tag :type="data.tagStatus">{{ data.status }}</el-tag>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="损坏类型:">
          <span>{{ data.damageTypeName }}</span>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="检测人:">
          <span>{{ data.userName }}</span>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="检测人ID:">
          <span>{{ data.inspectorID }}</span>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-form-item label="损坏描述:">
        <span v-if="!allowEdit">{{ data.damageDesciption }}</span>
        <el-input v-else v-model="data.damageDesciption" autosize type="textarea" />
      </el-form-item>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-form-item label="备注:">
          <span v-if="!allowEdit">{{ data.remarks }}</span>
          <el-input v-else v-model="data.remarks" autosize type="textarea" />
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
import { toTimeString } from '@/utils/time-handle'
export default {
  name: 'DetailFrom',
  props: {
    data: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  methods: {
    toTimeString
  }
}
</script>

<style scoped>

</style>
